package com.soft.service;

import com.soft.dao.OnWorkDaoImpl;
import com.soft.pojo.Workon;

import java.util.ArrayList;

/**
 * @author ruoxi
 * @create 2021-12-26 15:59
 */
public class OnWorkService {
    private OnWorkDaoImpl onWorkDao = new OnWorkDaoImpl();

    public ArrayList<Workon> findWorkerByPage(int currentPage,int currentCount){
        return (ArrayList<Workon>) onWorkDao.selectWorkOnByPage(currentPage,currentCount);
    }

    public int findWorkOnCount() {
        return onWorkDao.selectByAll().size();
    }

    public ArrayList<Workon> findOnWorkerByDate(String date,int currentPage,int currentCount){
        return (ArrayList<Workon>) onWorkDao.selectOnWorkerByDate("%" + date + "%", currentPage, currentCount);
    }
}
